#!/bin/bash
beep --help 2>/dev/null | grep Usage > /dev/null || exit 1
state=$(cat /proc/acpi/battery/BAT0/state | grep "charging state" | tr -s " " | cut -d" " -f3)
[[ "$state" =~ "charging" ]] || beep -f 2000 -l 10 -r 5 & 

